apiVersion: apps/v1
kind: Deployment
metadata:
  name: "{{ .Values.app.name }}-deployment"
spec:
  replicas: 1
  selector:
    matchLabels:
      app: "{{ .Values.app.name }}-deployment"
      components: {{ .Values.app.components }}
  template:
    metadata:
      labels:
        app: "{{ .Values.app.name }}-deployment"
        components: {{ .Values.app.components }}
    spec:
      containers:
      - name: {{ .Values.app.name }}
        image: "{{ .Values.app.image }}:{{ .Values.app.version }}"
        resources:
          limits:
            memory: {{ .Values.app.limits.memory}}
            cpu: {{ .Values.app.limits.cpu }}
        ports:
        - containerPort: {{ .Values.app.port }}
